﻿using RPAVIEW.util;
using RPAVIEW.views.EditPage;
using SUNRPA.CONTROLS.IMPL.util;
using System.Threading;
using System.Windows;

namespace RPAVIEW.views.CommonPages {
    /// <summary>
    /// RunnerInfoWin.xaml 的交互逻辑
    /// </summary>
    public partial class RunnerInfoWin : Window {
        private static LogUtil logger = new LogUtil(typeof(RunnerInfoWin));
        public Thread taskThread { get; set; }
        public RunnerInfoWin() {
            InitializeComponent();
        }

        private void pause(object sender, RoutedEventArgs e) {
            //暂停任务和停止任务先不做，等之后再做
            logger.Info("暂停任务");
        }

        private void stop(object sender, RoutedEventArgs e) {
            logger.Info("用户手动停止任务");
            this.cancelBtn.IsEnabled = false;
            System.Windows.Forms.Application.DoEvents();
            taskThread.Abort();
        }
    }
}
